package com.pro.service.imple;

import com.pro.mapper.JsCarouselMapper;
import com.pro.pojo.JsCarousel;
import com.pro.service.JsCarouselService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author 祖铭泽
 * @Date 2021/11/15/0015
 * @description 轮播图 业务层
 */
@Service
public class JsCarouselServiceImple implements JsCarouselService {
    @Autowired
    private JsCarouselMapper jsCarouselMapper;
    @Override
    public boolean addJsCarousel(JsCarousel jsCarousel) {
        return jsCarouselMapper.addJsCarousel(jsCarousel);
    }

    @Override
    public List<JsCarousel> getSlideshowsByDisplayImgType(JsCarousel jsCarousel) {
        return jsCarouselMapper.getSlideshowsByDisplayImgType(jsCarousel);
    }

    @Override
    public boolean delCurrentSlideshow(Integer carouselId) {
        return jsCarouselMapper.delCurrentSlideshow(carouselId);
    }

    @Override
    public boolean updateJsCarousel(JsCarousel jsCarousel) {
        return jsCarouselMapper.updateJsCarousel(jsCarousel);
    }

    @Override
    public List<JsCarousel> getAdvertisingCountsByCreateId(Integer createId) {
        return jsCarouselMapper.getAdvertisingCountsByCreateId(createId);
    }
}
